<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" session="false" %>
<%@ page import="com.atozsoft.commonutil.Constants"%>
<%@ page import="java.util.Date"%>
<%@ page import="java.text.SimpleDateFormat"%>
	
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- 
  - Author(s): houfy
  - Date: 2014-10-31 14:12:31
  - Description:
-->
<head>
    <%@include file="/common.jsp"%>
	<%@include file="/common/common.jsp"%>
    <%@include file="/coframe/tools/skins/common.jsp" %>
	<title>流程明细框架</title>
    <%
 	 	//流程实例ID
 	 	String processInstId = "";
		if(request.getParameter("processInstId")!=null){
			processInstId = (String)request.getParameter("processInstId");
		}
		
		String workitemid = "";	
		if(request.getParameter("workitemid")!=null){
			workitemid = (String)request.getParameter("workitemid");
		}
		
		String webType = "";
		if(request.getParameter("webType")!=null){
			webType = (String)request.getParameter("webType");
		}
		
		String processDataType = ""; //判断数据类型是转发、抄送、加审
		if(request.getParameter("dataType")!=null){
			processDataType = (String)request.getParameter("dataType");
		}
		
		String fromWeb = ""; //判断页面来源
		if(request.getParameter("fromWeb")!=null){
			fromWeb = (String)request.getParameter("fromWeb");
		}
		//节点名称
		String activitydefid = "";
		if(request.getParameter("activitydefid")!=null) {
			activitydefid = (String)request.getParameter("activitydefid");
		}
 	%>
</head>
<body>
	<div id="processBtn" class="nui-toolbar" style="width:100%;padding:0px;" borderStyle="border:0;">
		<table style="width:100%;">
	    	<tr style="width:100%;">
	        	<td style="text-align:right;">
	          		<a id="copyBtn"              class="nui-button" iconCls="icon-find"    onclick="onCopyTo()">抄送</a>
	          		<a id="addApproveOpinionBtn" class="nui-button" iconCls="icon-add"     onclick="addApproveOpinion()">意见</a>
	          		<a id="editBtn"              class="nui-button" iconCls="icon-edit"    onclick="onEdit()">保存</a>
	          		<a id="saveBtn"              class="nui-button" iconCls="icon-save"    onclick="onSave()">保存</a>
	          		<a id="refreshBtn"           class="nui-button" iconCls="icon-undo"    onclick="onRefresh()">撤销</a>
	          		<a id="cancelBtn"            class="nui-button" iconCls="icon-cancel"  onclick="onCancel()">退回</a>
	          		<a id="rollbackBtn"          class="nui-button" iconCls="icon-upgrade" onclick="onRollback()">撤回</a>
	          		<a id="stopBtn"              class="nui-button" iconCls="icon-lock"    onclick="onStop()">终止</a>
	          		<a id="addexamineBtn"        class="nui-button" iconCls="icon-add"     onclick="onAddExamine()">加审</a>
	          		<a id="turnBtn"              class="nui-button" iconCls="icon-goto"    onclick="onTurn()">转发</a>
	          		<a id="okBtn"                class="nui-button" iconCls="icon-ok"      onclick="onOk()">同意</a>
	          		<a id="printBtn"             class="nui-button" iconCls="icon-print"   onclick="onPrint()">打印</a>
	        	</td>
	      	</tr>
	    </table>
	</div>
	<div class="nui-fit">
		<div id="tabs1" class="nui-tabs" activeIndex="0" style="width:100%;height:100%;" plain="true" onactivechanged="changeTab">
			<div id="formTab" name="formTab" title="表单" style="width:100%;height:100%;"></div>
			<div id="approveTab" title="审批意见" url="process_Detail_approve.jsp?processInstId=<%=processInstId%>">

			</div>
			<div id="processTab" title="流程" url="process_Detail_workflow.jsp?processInstId=<%=processInstId%>" style="width:100%;height:100%;"></div>
		</div>  
	</div>
	<script type="text/javascript">
    	nui.parse();
    	
    	var strUrl = "";
    	//获取工作项URL，填充到iframe的src中
        getWorkItemUrl();
    	var tabs = nui.get("tabs1");
    	var formTab= tabs.getTab("formTab");
		tabs.loadTab("<%=request.getContextPath()%>" + strUrl + "?processInstId=<%=processInstId %>&workitemid=<%=workitemid %>&actionFlg=process&webType=<%=webType %>&activitydefid=<%=activitydefid %>", formTab);
		//重载Tab，显示页面
		tabs.reloadTab(formTab);
    	
    	//页面操作按钮加载(加载状态分：阅读：read；操作：operate；已完成：done)
    	var webType = "<%=webType %>";
    	//获取页面来源
    	var fromWeb = "<%=fromWeb%>"
    	//流程数据类型
    	var processDataType = "<%=processDataType %>";
    	var workitemid = "<%=workitemid %>";
    	var processInstId="<%=processInstId%>";
    	
    	
    	// 设定按钮是否加载的全局变量(false:未显示-默认；true：显示)
    	var editStr = "false";
    	var saveStr = "false";
    	var refreshStr = "false";
    	
    	//获取当前流程实例的实际工作项
    	//判断当前操作是否合法
    	if(webType!="read"){	//抄送读取，抄送时，不判断节点坐在状态
			showProcessWorkItemBePlay();
		}
    	
    	
    	if(webType!=null && webType!=""){
    		//已完成待办进入后取得读取操作
    		if(webType=="operate"){ //待办
    			hideAll();
    			showButton();
    			//流程审批操作时，不可执行撤回操作
    			$("#rollbackBtn").hide();
    			//$("#refreshBtn").hide();
    		}else if(webType=="done"){ //已完成待办
    			hideAll();
    			showButton();
    			$("#copyBtn").hide();
    			$("#addApproveOpinionBtn").hide();
    			$("#cancelBtn").hide();
    			$("#addexamineBtn").hide();
    			$("#turnBtn").hide();
    			$("#okBtn").hide();
    			$("#refreshBtn").hide();
    			$("#saveBtn").hide();
    			$("#editBtn").hide();
    		}else if(webType=="read"){	//抄送读取
    			hideAll();
    			//显示意见按钮
    			$("#addApproveOpinionBtn").show();
    		}else if(webType=="xsoperate"){ //下属待办
    			hideAll();
    		}
    	}
    	
    	//抄送，转发与加审操作按钮控制
    	if(processDataType != null && processDataType != ""){
    		var handleType = "";
        	if(processDataType.indexOf("-") > 0){
        	    var dataType = processDataType.split("-");
        	    handleType = dataType[0];
	        	if("forward" == handleType){  //转发接收人操作
					$("#copyBtn").hide();
		    		$("#addexamineBtn").hide();
		    		$("#rollbackBtn").hide();
		    		$("#turnBtn").hide();
		    		$("#stopBtn").hide();
	        	}else if("addApprove" == handleType){  //加审接收人操作
					$("#copyBtn").hide();
		    		$("#addexamineBtn").hide();
		    		$("#rollbackBtn").hide();
		    		$("#turnBtn").hide();
		    		$("#stopBtn").hide();
	        	}else if("operate" == handleType){  //加审接收人操作
					//流程审批操作时，不可执行撤回操作
    				$("#rollbackBtn").hide();
	        	}else if("copyTo" == handleType){  //抄送接收人操作
		    			$("#copyBtn").hide();
						$("#cancelBtn").hide();
						$("#addexamineBtn").hide();
						$("#turnBtn").hide();
						$("#okBtn").hide();
						$("#rollbackBtn").hide();
						$("#stopBtn").hide();
						$("#refreshBtn").hide();
    					$("#saveBtn").hide();
    					$("#editBtn").hide();
	        	} 
        	}
    	}
    	
    	//获取当前流程实例的状态
        //流程已经完成或终止，所有操作不可用
        getProcessInstState();
    	
    	//隐藏全部按钮
    	function hideAll(){
    		$("#copyBtn").hide();
    		$("#addApproveOpinionBtn").hide();
			$("#cancelBtn").hide();
			$("#addexamineBtn").hide();
			$("#turnBtn").hide();
			$("#okBtn").hide();
			$("#rollbackBtn").hide();
			$("#stopBtn").hide();
			$("#printBtn").hide();
			$("#refreshBtn").hide();
    		$("#saveBtn").hide();
    		$("#editBtn").hide();
    	}
    	
    	//新增TAB
    	var index = 4;
    	function addTab(taburl,tabname) {
            var tabs = nui.get("tabs1");
            //add tab
            var tab = { title: tabname, url: taburl, showCloseButton: true };
            //tab.url = taburl; 
            tab = tabs.addTab(tab);            
            //tab body
            var el = tabs.getTabBodyEl(tab);
            el.innerHTML = index;
            //active tab
            tabs.activeTab(tab);
        }
        
    	//查询工作项对应的按钮
    	function showButton(){
    		var workitemid = "<%=workitemid %>";
        	var json = nui.encode({workitemid:workitemid});
	        $.ajax({
	            url: "com.atozsoft.wf.processOperate.queryProcessConfigButtonNote.biz.ext",
	            type: 'POST',
	            data:json,
	            cache: false,
	            async: false,
	            contentType: 'text/json',
	            success: function(text) {
	                if(text.list[0]){
		                var buttonlist = text.list[0].buttontype;
		                var buttonarray = buttonlist.split(",");
		                for (var i=0 ; i< buttonarray.length ; i++)
						{
							var tempbuttonarray = buttonarray[i].split("-");
							if(tempbuttonarray[0]=="1"){ //1抄送
								nui.get("copyBtn").setText(tempbuttonarray[1]);
								$("#copyBtn").show();
							}else if(tempbuttonarray[0]=="2"){  //2退回
								nui.get("cancelBtn").setText(tempbuttonarray[1]);
								$("#cancelBtn").show();
							}else if(tempbuttonarray[0]=="3"){ //3撤回
								nui.get("rollbackBtn").setText(tempbuttonarray[1]);
								$("#rollbackBtn").show();
							}else if(tempbuttonarray[0]=="4"){ //4终止
								nui.get("stopBtn").setText(tempbuttonarray[1]);
								$("#stopBtn").show();
							}else if(tempbuttonarray[0]=="5"){ //5加审
								nui.get("addexamineBtn").setText(tempbuttonarray[1]);
								$("#addexamineBtn").show();
							}else if(tempbuttonarray[0]=="6"){ //6转发
								nui.get("turnBtn").setText(tempbuttonarray[1]);
								$("#turnBtn").show();
							}else if(tempbuttonarray[0]=="7"){ //7同意
								nui.get("okBtn").setText(tempbuttonarray[1]);
								$("#okBtn").show();
							}else if(tempbuttonarray[0]=="8"){ //8打印
								nui.get("printBtn").setText(tempbuttonarray[1]);
								$("#printBtn").show(); 
							}else if(tempbuttonarray[0]=="9"){ //9撤销
								nui.get("refreshBtn").setText(tempbuttonarray[1]);
								$("#refreshBtn").show(); 
								refreshStr = "true";
							}else if(tempbuttonarray[0]=="10"){ //10保存
								nui.get("saveBtn").setText(tempbuttonarray[1]);
								$("#saveBtn").show(); 
								saveStr = "true";
							}else if(tempbuttonarray[0]=="11"){ //11编辑
								nui.get("editBtn").setText(tempbuttonarray[1]);
								$("#editBtn").show(); 
								editStr = "true";
							}
						}
					}else{
						nui.alert("请配置该流程节点按钮！");		
					}
	          }
	        });
    	}
        
        /* //不可用保存与刷新按钮-加载设定
		if(editStr=="true"){
			//btnDisable("#editBtn");
			nui.get("editBtn").enable();
		}
		if(saveStr=="true"){
			//btnEnable("#saveBtn");
			nui.get("saveBtn").disable();
		}
		if(refreshStr=="true"){
			//btnEnable("#refreshBtn");
			nui.get("refreshBtn").disable();
		} */
    	
    	// 切换tab时重新加载
	    function changeTab(e){
			var tabs = nui.get("tabs1");
			var tab = tabs.getActiveTab();
	    	if(tab.title=="审批意见"){
		    	var approveTab= tabs.getTab("approveTab");
		    	//var workType = "'" + self["infoFrame"].parentWorkType + "'" ;
		    	var workType = "1213" ;
		    	var strUrl = "process_Detail_approve.jsp?processInstId=<%=processInstId%>";
		    	if(workType != null && workType != "" && workType!="undefined" ){
		    		strUrl = "process_Detail_approve.jsp?processInstId=<%=processInstId%>&workType=" + workType;
		    	}
				tabs.loadTab(strUrl, approveTab);
				//重载Tab，显示页面
				tabs.reloadTab(approveTab);
			}
		}
    	
    	//获取当前流程实例的状态
		function getProcessInstState(){
			var processInstId = "<%=processInstId %>";
        	var json = nui.encode({processInstId:processInstId});
	        $.ajax({
	            url: "com.atozsoft.wf.processOperate.queryProcessInstState.biz.ext",
	            type: 'POST',
	            data:json,
	            cache: false,
	            async: false,
	            contentType: 'text/json',
	            success: function(text) {
	                var currentState = text.currentState;
	                if(currentState == '7' || currentState == '8'){
	                	//流程已经完成或终止，所有操作不可用
	                	hideAll();
	                	if(webType=="read"){
	                		$("#addApproveOpinionBtn").show();
	                	}
	                	$("#printBtn").show();
						
						//self["infoFrame"].onParentCallAfterStop();
	                }
	          }
	        });
		}
    	
    	//获取当前流程实例的实际工作项
		function showProcessWorkItemBePlay(){
			var processInstId = "<%=processInstId %>";
			var workitemid = "<%=workitemid %>";
        	var json = nui.encode({processInstId:processInstId});
	        $.ajax({
	            url: "com.atozsoft.wf.processOperate.queryProcessWorkItemBeplayByPid.biz.ext",
	            type: 'POST',
	            data:json,
	            cache: false,
	            async: false,
	            contentType: 'text/json',
	            success: function(text) {
	                if(text=="" || text == null){
		               hideAll();
	                }else{
	                	var data = text.datas[0];
		                if(data != null && data != ""){
			                if(data.workItemID != workitemid){
			                	webType = "done";
			                }
		                }
	                }
	          }
	        });
		}
		
		//获取当前流程实例的执行工作项的操作人
		function getNextWorkItemPARTICIPANT(){
			var processInstId = "<%=processInstId %>";
        	var json = nui.encode({processInstId:processInstId});
	        $.ajax({
	            url: "com.atozsoft.wf.processOperate.queryNextWorkItemPARTICIPANT.biz.ext",
	            type: 'POST',
	            data:json,
	            cache: false,
	            async: false,
	            contentType: 'text/json',
	            success: function(text) {
	                var data = text;
	                var partiName = data.partiName;
	                if(partiName != null && partiName != ""){
	                	//流程已经完成或终止，所有操作不可用
						nui.alert("下一审批人为：" + partiName + "！", "提示", function(action){
							if(action == "ok" || action == "close"){
					    		//调用子页面的节点控制函数
					    		self["infoFrame"].onParentCallAfterOk();
							}
						});
	                }else{
						nui.alert("审批已完成！", "提示", function(action){
							if(action == "ok" || action == "close"){
			                	//调用子页面的节点控制函数
								self["infoFrame"].onParentCallAfterOk();
							}
						});
	                }
	          }
	        });
		}
		
		//获取当前流程实例的执行工作项的操作人(加审操作)
		function getaddApprovePARTICIPANT(){
			var processInstId = "<%=processInstId %>";
        	var json = nui.encode({processInstId:processInstId});
	        $.ajax({
	            url: "com.atozsoft.wf.processOperate.queryNextWorkItemPARTICIPANT.biz.ext",
	            type: 'POST',
	            data:json,
	            cache: false,
	            async: false,
	            contentType: 'text/json',
	            success: function(text) {
	                var data = text;
	                var partiName = data.partiName;
	                if(partiName != null && partiName != ""){
	                	//流程已经完成或终止，所有操作不可用
						nui.alert("下一审批人为：" + partiName + "！", "提示", function(action){
							if(action == "ok" || action == "close"){
					    		//调用子页面的节点控制函数
					    		self["infoFrame"].onParentCallAfterOk();
							}
						});
	                }else{
						nui.alert("审批已完成！", "提示", function(action){
							if(action == "ok" || action == "close"){
			                	//调用子页面的节点控制函数
								self["infoFrame"].onParentCallAfterOk();
							}
						});
	                }
	          }
	        });
		}
		
        //获取工作项URL
        function getWorkItemUrl(){
        	var workitemid = "<%=workitemid %>";
        	var json =nui.encode({workitemid:workitemid});
	        $.ajax({
	            url: "com.atozsoft.wf.processOperate.queryWorkItemUrl.biz.ext",
	            type: 'POST',
	            data:json,
	            cache: false,
	            async: false,
	            contentType: 'text/json',
	            success: function(text) {
	                strUrl = text.strUrl;
	                
	          }
	        });
        }
    	
    	//退回
	    function onCancel(){
	   		//var workType = "'" + self["infoFrame"].parentWorkType + "'" ;
	   		var workType = "1213" ;
	   		var btnEdit = this;
	    	nui.open({
	            url: "<%=request.getContextPath()%>/wf/popup/process_Operate.jsp?operateType=returnstepHandle&processInstId=<%=processInstId %>&workitemid=<%=workitemid %>&workType=" + workType + "&processDataType="+ processDataType,
		        title: "退回",
				width: 620, 
		        height: 220,
		        onload: function() {
		        },
		        ondestroy: function (action) {
	                if (action == "ok") {
	                	//页面按钮控制
	                	hideAll();
	                	//getNextWorkItemPARTICIPANT();
	                	//回调函数，编辑追加处理
	                    //self["infoFrame"].onParentCallAfterOk();
	                    getNextWorkItemPARTICIPANT();
	                }
	                
	                if(fromWeb!="" && fromWeb=="processlist"){
	                	window.parent.refreshTab("myProcess_List");
	                }
	                window.parent.refreshTab("dbtab");
	             }
		    });
		}
		
		//撤回
	    function onRollback(){
	    	//var workType = "'" + self["infoFrame"].parentWorkType + "'" ;
	    	var workType = "1213" ;
	   		var btnEdit = this;
	    	nui.open({
	            url: "<%=request.getContextPath()%>/wf/popup/process_Operate.jsp?operateType=rollbackHandle&processInstId=<%=processInstId %>&workitemid=<%=workitemid %>&workType=" + workType,
		        title: "撤回",
				width: 620, 
		        height: 220,
		        onload: function() {
		        },
		        ondestroy: function (action) {
	                if (action == "ok") {
	                	//页面按钮控制
			            //hideAll();
			            //grid.reload();
			            window.location.href="<%=request.getContextPath()%>/wf/processOperate/process_Detail.jsp?webType=operate&workitemid=<%=workitemid %>&processInstId=<%=processInstId %>&dataType=<%=processDataType %>";
	                }
	                
	                if(fromWeb!="" && fromWeb=="processlist"){
	                	window.parent.refreshTab("myProcess_List");
	                }
	                window.parent.refreshTab("dbtab");
	             }
		    });
		}
		
		//终止
	    function onStop(){
	   		//var workType = "'" + self["infoFrame"].parentWorkType + "'" ;
	   		var workType = "1213" ;
	   		var btnEdit = this;
	    	nui.open({
	            url: "<%=request.getContextPath()%>/wf/popup/process_Operate.jsp?operateType=stopHandle&processInstId=<%=processInstId %>&workitemid=<%=workitemid %>&workType=" + workType + "&processDataType="+ processDataType,
		        title: "终止",
				width: 620, 
		        height: 220,
		        onload: function() {
		        },
		        ondestroy: function (action) {
	                if (action == "ok") {
	                	//调用页面的终止方法
			            self["infoFrame"].onStop();
	                	//页面按钮控制
	                	hideAll();
	                }
	                
	                if(fromWeb!="" && fromWeb=="processlist"){
	                	window.parent.refreshTab("myProcess_List");
	                }
	                window.parent.refreshTab("dbtab");
	             }
		    });
		}
		
		var isSelect = "";
    	//同意
	    function onOk(){
	   		// 获取业务画面的function
	   		//alert();
			// 根据名称获取tab
			var rTab = tabs.getTab("formTab");
			// 获取tab的Html Iframe
			var elm = tabs.getTabIFrameEl(rTab);
            var flag="";
			//从加载页面设定流程所需变数
			if(elm != undefined){
				if(elm.contentWindow != undefined){
					//调用子页面的参数设定函数
					elm.contentWindow.onParentEditParams();	
					//选择审批人
					isSelect = elm.contentWindow.getCheckSet();
				}
			}
			
            //未选择审批者,执行同意操作
			if(elm != 'undefined'){
				if(elm.contentWindow != 'undefined'){
					agree(isSelect);
   				}
   			} 
		}
		
		//同意子方法
		function agree(isSelect){
			var workType = "1213" ;
	   		var btnEdit = this;
	    	nui.open({
	            url: "<%=request.getContextPath()%>/wf/popup/process_Operate.jsp?operateType=agreeHandle&processInstId=<%=processInstId %>&workitemid=<%=workitemid %>&workType=" + workType + "&processDataType="+ processDataType + "&isSelect="+isSelect,
				title: "同意",
				width: 620, 
		        height: 190,
		        onload: function () {
                },
                ondestroy: function (action) {
                   if (action == "ok") {
	                  //页面按钮控制
	                  hideAll();
	                  // 获取业务画面的function
	                  // 根据名称获取tab
					  var rTab = tabs.getTab("formTab");
					  // 获取tab的Html Iframe
					  var elm = tabs.getTabIFrameEl(rTab);
					  if(elm != undefined){
						  if(elm.contentWindow != undefined){
							  // 调用页面保存
							  elm.contentWindow.noEdit();
							  elm.contentWindow.onParentCallAfterOk();	
						  }
					  }
	                  getNextWorkItemPARTICIPANT();
	                  //回调函数，编辑追加处理
	                  // alert("同意："+action);
	                  //self["infoFrame"].onParentCallAfterOk();
	               }

	                if(fromWeb!="" && fromWeb=="processlist"){
                		window.parent.refreshTab("myProcess_List");
	                }
	                window.parent.refreshTab("dbtab");
                }
		    });
		}
		
		//刷新-撤销
	    function onRefresh(){
			nui.confirm("您确定要撤销所有的修改吗？", "提示", function(action){
				if(action == "ok"){
					//刷新tab页
					tabs.reloadTab(formTab);
				}else{
					return;
				}
			});
		}
		
		//保存-调用业务画面操作
	    function onSave(){
	   		// 获取业务画面的function
			// 根据名称获取tab
			var rTab = tabs.getTab("formTab");
			// 获取tab的Html Iframe
			var elm = tabs.getTabIFrameEl(rTab);
	   		if(elm != undefined){
				if(elm.contentWindow != undefined){
					// 调用页面保存
					var resultStr = elm.contentWindow.onParentCallOk();
					if(resultStr == "true"){
						// 调用页面控制按钮
						elm.contentWindow.noEdit();
						
						//显示
						if(editStr=="true"){
							//btnEnable("#editBtn");
							nui.get("editBtn").enable();
						}
						//隐藏保存与刷新按钮
						if(saveStr=="true"){
							//btnDisable("#saveBtn");
							nui.get("saveBtn").disable();
						}
						if(refreshStr=="true"){
							//btnDisable("#refreshBtn");
							nui.get("refreshBtn").disable();
						}
					} 
				}
			}	
		}
		
		//业务画面调用父页面刷新操作
	    function onBusinessCallRefresh(){
			//刷新tab页
			tabs.reloadTab(formTab);
		}
		
		function onEdit(){
			//刷新tab页
			tabs.reloadTab(formTab);
			//$("#editBtn").disable();
			//隐藏当前按钮
			//btnDisable("#editBtn");
			nui.get("editBtn").disable();
			//显示保存于刷新按钮
			if(saveStr=="true"){
				//btnEnable("#saveBtn");
				nui.get("saveBtn").enable();
			}
			
			if(refreshStr=="true"){
				//btnEnable("#refreshBtn");
				nui.get("refreshBtn").enable();
			}
		}
		
		//打印
	    function onPrint(){
	    	//调用子页面的保存函数
			self["infoFrame"].onParentCallPrint();
		}
  
        //附件ID
        var ids= "";
        
        function showAtt(e){
	        if (this.field=="showatt"){
		        //附件ID赋值
		        ids=e.row.fileid;
		        if(ids!=""&&ids!=null){
		         	return "<a href='#' onclick='onShowPopup();'>附件</a>";
		        }else{
		        	return null;
		        }
        	}
        }
        
        function onShowPopup() {      
            nui.open({
	            url: "<%=request.getContextPath()%>/wf/popup/process_files.jsp?ids=" + ids,
		        title: "附件",
				width: 410, 
		        height: 200,
		        onload: function () {
                },
                ondestroy: function (action) {
                }
		    });
        }
    </script>
</body>
</html>